﻿using Core.Domain.Entities;
using Core.Migrations.Extensions;
using FluentMigrator;

namespace Infrastructure.Persistence.Migrations.Users;

[Migration(202511012246)]
public class AddIsSuperAdminColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(typeof(User).GetTableName())
          .InSchema(SchemaNames.Identity)
          .AddColumn(MigrationExpressions.ColumnNameFor<User>(nameof(User.IsSuperAdmin)))
          .AsBoolean()
          .WithDefaultValue(false)
          .Nullable()
          .WithColumnDescription("是否超级管理员/免权限校验");   
    }
}
